Optimal. Leaf size=205 \[ -\frac {2 i (c+d x)^3 \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \text {PolyLog}\left (3,-i e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \text {PolyLog}\left (3,i e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^3 \text {PolyLog}\left (4,-i e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \text {PolyLog}\left (4,i e^{i (a+b x)}\right )}{b^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {4266, 2611,
6744, 2320, 6724} \begin {gather*} -\frac {2 i (c+d x)^3 \text {ArcTan}\left (e^{i (a+b x)}\right )}{b}-\frac {6 i d^3 \text {Li}_4\left (-i e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \text {Li}_4\left (i e^{i (a+b x)}\right )}{b^4}-\frac {6 d^2 (c+d x) \text {Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \text {Li}_3\left (i e^{i (a+b x)}\right )}{b^3}+\frac {3 i d (c+d x)^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2320
Rule 2611
Rule 4266
Rule 6724
Rule 6744
Rubi steps
\begin {align*} \int (c+d x)^3 \sec (a+b x) \, dx &=-\frac {2 i (c+d x)^3 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {(3 d) \int (c+d x)^2 \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac {(3 d) \int (c+d x)^2 \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {2 i (c+d x)^3 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {\left (6 i d^2\right ) \int (c+d x) \text {Li}_2\left (-i e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 i d^2\right ) \int (c+d x) \text {Li}_2\left (i e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {2 i (c+d x)^3 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \text {Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \text {Li}_3\left (i e^{i (a+b x)}\right )}{b^3}+\frac {\left (6 d^3\right ) \int \text {Li}_3\left (-i e^{i (a+b x)}\right ) \, dx}{b^3}-\frac {\left (6 d^3\right ) \int \text {Li}_3\left (i e^{i (a+b x)}\right ) \, dx}{b^3}\\ &=-\frac {2 i (c+d x)^3 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \text {Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \text {Li}_3\left (i e^{i (a+b x)}\right )}{b^3}-\frac {\left (6 i d^3\right ) \text {Subst}\left (\int \frac {\text {Li}_3(-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}+\frac {\left (6 i d^3\right ) \text {Subst}\left (\int \frac {\text {Li}_3(i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}\\ &=-\frac {2 i (c+d x)^3 \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \text {Li}_3\left (-i e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \text {Li}_3\left (i e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^3 \text {Li}_4\left (-i e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \text {Li}_4\left (i e^{i (a+b x)}\right )}{b^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 196, normalized size = 0.96 \begin {gather*} -\frac {i \left (2 b^3 (c+d x)^3 \text {ArcTan}\left (e^{i (a+b x)}\right )-3 d \left (b^2 (c+d x)^2 \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )+2 i b d (c+d x) \text {PolyLog}\left (3,-i e^{i (a+b x)}\right )-2 d^2 \text {PolyLog}\left (4,-i e^{i (a+b x)}\right )\right )+3 d \left (b^2 (c+d x)^2 \text {PolyLog}\left (2,i e^{i (a+b x)}\right )+2 i b d (c+d x) \text {PolyLog}\left (3,i e^{i (a+b x)}\right )-2 d^2 \text {PolyLog}\left (4,i e^{i (a+b x)}\right )\right )\right )}{b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 684 vs. \(2 (180 ) = 360\).
time = 0.19, size = 685, normalized size = 3.34
method | result | size |
risch | \(\frac {d^{3} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{3}}{b}-\frac {d^{3} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{3}}{b}-\frac {a^{3} d^{3} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {a^{3} d^{3} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {2 i c^{3} \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {6 d^{2} c \polylog \left (3, i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 d^{3} \polylog \left (3, i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}-\frac {6 d^{2} c \polylog \left (3, -i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {6 d^{3} \polylog \left (3, -i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}+\frac {6 i d^{3} \polylog \left (4, i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {6 i d^{3} \polylog \left (4, -i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {6 i c \,d^{2} a^{2} \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 i c^{2} d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 i d^{2} c \polylog \left (2, i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {6 i d^{2} c \polylog \left (2, -i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 i d^{3} a^{3} \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {3 i d^{3} \polylog \left (2, i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {3 i c^{2} d \polylog \left (2, i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {3 i c^{2} d \polylog \left (2, -i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {3 i d^{3} \polylog \left (2, -i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {3 c^{2} d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {3 c^{2} d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {3 a^{2} c \,d^{2} \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {3 c^{2} d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {3 c^{2} d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {3 d^{2} c \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}-\frac {3 d^{2} c \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}+\frac {3 a^{2} c \,d^{2} \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}\) | \(685\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 722 vs. \(2 (167) = 334\).
time = 0.63, size = 722, normalized size = 3.52 \begin {gather*} \frac {2 \, c^{3} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right ) - \frac {6 \, a c^{2} d \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b} + \frac {6 \, a^{2} c d^{2} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b^{2}} - \frac {2 \, a^{3} d^{3} \log \left (\sec \left (b x + a\right ) + \tan \left (b x + a\right )\right )}{b^{3}} + \frac {12 i \, d^{3} {\rm Li}_{4}(i \, e^{\left (i \, b x + i \, a\right )}) - 12 i \, d^{3} {\rm Li}_{4}(-i \, e^{\left (i \, b x + i \, a\right )}) - 2 \, {\left (i \, {\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (i \, b c d^{2} - i \, a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (i \, b^{2} c^{2} d - 2 i \, a b c d^{2} + i \, a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), \sin \left (b x + a\right ) + 1\right ) - 2 \, {\left (i \, {\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (i \, b c d^{2} - i \, a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (i \, b^{2} c^{2} d - 2 i \, a b c d^{2} + i \, a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \arctan \left (\cos \left (b x + a\right ), -\sin \left (b x + a\right ) + 1\right ) - 6 \, {\left (i \, b^{2} c^{2} d - 2 i \, a b c d^{2} + i \, {\left (b x + a\right )}^{2} d^{3} + i \, a^{2} d^{3} + 2 \, {\left (i \, b c d^{2} - i \, a d^{3}\right )} {\left (b x + a\right )}\right )} {\rm Li}_2\left (i \, e^{\left (i \, b x + i \, a\right )}\right ) - 6 \, {\left (-i \, b^{2} c^{2} d + 2 i \, a b c d^{2} - i \, {\left (b x + a\right )}^{2} d^{3} - i \, a^{2} d^{3} + 2 \, {\left (-i \, b c d^{2} + i \, a d^{3}\right )} {\left (b x + a\right )}\right )} {\rm Li}_2\left (-i \, e^{\left (i \, b x + i \, a\right )}\right ) + {\left ({\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (b c d^{2} - a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \sin \left (b x + a\right ) + 1\right ) - {\left ({\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (b c d^{2} - a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \sin \left (b x + a\right ) + 1\right ) + 12 \, {\left (b c d^{2} + {\left (b x + a\right )} d^{3} - a d^{3}\right )} {\rm Li}_{3}(i \, e^{\left (i \, b x + i \, a\right )}) - 12 \, {\left (b c d^{2} + {\left (b x + a\right )} d^{3} - a d^{3}\right )} {\rm Li}_{3}(-i \, e^{\left (i \, b x + i \, a\right )})}{b^{3}}}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 970 vs. \(2 (167) = 334\).
time = 0.45, size = 970, normalized size = 4.73 \begin {gather*} \frac {6 i \, d^{3} {\rm polylog}\left (4, i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 6 i \, d^{3} {\rm polylog}\left (4, i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - 6 i \, d^{3} {\rm polylog}\left (4, -i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - 6 i \, d^{3} {\rm polylog}\left (4, -i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - 3 \, {\left (i \, b^{2} d^{3} x^{2} + 2 i \, b^{2} c d^{2} x + i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - 3 \, {\left (i \, b^{2} d^{3} x^{2} + 2 i \, b^{2} c d^{2} x + i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, b^{2} d^{3} x^{2} - 2 i \, b^{2} c d^{2} x - i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, b^{2} d^{3} x^{2} - 2 i \, b^{2} c d^{2} x - i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, -i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right )}{2 \, b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right )^{3} \sec {\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c+d\,x\right )}^3}{\cos \left (a+b\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________